import request from '@/utils/request'

// 查询门店管理列表
export function listShop(query) {
	return request({
		url: '/shop/shop/list',
		method: 'get',
		params: query
	})
}
// 查询门店排行列表
export function listShopByStar(query) {
	return request({
		url: '/shop/shop/listByStar',
		method: 'get',
		params: query
	})
}

// 查询门店管理详细
export function getShop(shopId) {
	return request({
		url: '/shop/shop/' + shopId,
		method: 'get'
	})
}

// 新增门店管理
export function addShop(data) {
	return request({
		url: '/shop/shop',
		method: 'post',
		data: data
	})
}

// 修改门店管理
export function updateShop(data) {
	return request({
		url: '/shop/shop',
		method: 'put',
		data: data
	})
}

// 删除门店管理
export function delShop(shopId) {
	return request({
		url: '/shop/shop/' + shopId,
		method: 'delete'
	})
}